@header-trigger-prefix-cls: ~'@{namespace}-layout-header-trigger';
@header-prefix-cls: ~'@{namespace}-layout-header';
@breadcrumb-prefix-cls: ~'@{namespace}-layout-breadcrumb';
@logo-prefix-cls: ~'@{namespace}-app-logo';
@header-user-dropdown-prefix-cls: ~'@{namespace}-header-user-dropdown';

.@{header-prefix-cls} {
  display: flex;
  height: @header-height !important;
  padding: 0;
  line-height: @header-height !important;
  background-color: transparent !important;
  align-items: center;
  justify-content: space-between;
  padding-inline: 0 !important;

  &--mobile {
    .@{breadcrumb-prefix-cls},
    .error-action,
    .notify-item,
    .fullscreen-item {
      display: none;
    }

    .@{logo-prefix-cls} {
      min-width: unset;
      padding-right: 0;

      &__title {
        display: none;
      }
    }
    .@{header-trigger-prefix-cls} {
      padding: 0 4px 0 8px !important;
    }
    .@{header-prefix-cls}-action {
      padding-right: 4px;
    }
  }

  &--fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: @layout-header-fixed-z-index;
    width: 100%;
  }

  &-logo {
    height: @header-height;
    min-width: 210px;
    font-size: 14px;

    img {
      width: 100%;
      height: 100%;
      // margin-right: 2px;
    }
  }

  &-left {
    display: flex;
    height: 100%;
    align-items: center;

    .@{header-trigger-prefix-cls} {
      display: flex;
      height: 100%;
      padding: 1px 10px 0;
      cursor: pointer;
      align-items: center;

      .anticon {
        font-size: 16px;
      }

      // &.light {
      //   &:hover {
      //     background-color: @header-light-bg-hover-color;
      //   }

      //   svg {
      //     fill: #000;
      //   }
      // }

      // &.dark {
      //   &:hover {
      //     background-color: @header-dark-bg-hover-color;
      //   }
      // }
    }
  }

  &-menu {
    height: 100%;
    min-width: 0;
    flex: 1;
    align-items: center;
  }

  &-action {
    display: flex;
    min-width: 180px;
    align-items: center;
    padding-right: 10px;

    &__item {
      display: flex !important;
      height: 36px;
      padding: 0 2px;
      font-size: 1.2em;
      cursor: pointer;
      align-items: center;
      border-radius: var(--border-radius);
      &:hover {
        background: rgba(247, 247, 247, 0.4);
      }
      /* 定义keyframe动画，命名为twinkle */
      @keyframes twinkle {
        0% {
          opacity: 1;
        }
        50% {
          opacity: 1;
        }
        50.01% {
          opacity: 0;
        }
        100% {
          opacity: 0;
        }
      }
      .twinkle {
        animation: twinkle 0.5s linear infinite;
      }
    }

    .icon-ym {
      font-size: 18px;
      padding: 0 10px;
    }
  }

  &--light {
    .@{header-prefix-cls}-logo {
      color: @text-color-base;
    }

    .@{header-prefix-cls}-action {
      &__item {
        color: @text-color-base;

        .app-iconify {
          padding: 0 10px;
          font-size: 16px !important;
        }
      }

      &-icon,
      span[role='img'] {
        color: @text-color-base;
      }
    }
  }

  &--dark {
    background-color: @header-dark-bg-color !important;
    border-left: 1px solid @border-color-base;
    .@{header-prefix-cls}-logo {
      &:hover {
        background-color: @header-dark-bg-hover-color;
      }
    }

    .@{header-prefix-cls}-action {
      &__item {
        .app-iconify {
          padding: 0 10px;
          font-size: 16px !important;
        }

        .ant-badge {
          span {
            color: @white;
          }
        }

        &:hover {
          background-color: @header-dark-bg-hover-color;
        }
      }
      .@{header-user-dropdown-prefix-cls}{
        &:hover {
          background-color: @header-dark-bg-hover-color;
        }
      }
    }
  }
}
